<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" layout:decorator="layout/base">
<head>
	<title th:text="'订单收款明细-'+${name}"></title>
	<script type="text/javascript" th:src="@{/assets/js/plugins/pickers/daterangepicker.js}"></script>
</head>

<body>

	<!-- Page header -->
	<div class="page-header" layout:fragment="page-header">
		<div class="page-header-content">
			<div class="page-title">
				<h4><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold" th:text="#{web.name}">管理系统</span> - 订单收款明细</h4>
			</div>
		</div>
	</div>
	<!-- /page header -->


	<!-- Main content -->
	<div class="content-wrapper" layout:fragment="content">

		<!-- Table -->
		<div class="panel panel-flat min-panel">
			<div class="panel-heading">
				<h5 class="panel-title text-primary" th:text="'订单收款明细——'+${name}"></h5>
        	</div>

        	<div class="panel-body">
        			<form id="query" action="#" class="form-horizontal">
						<div class="row">
							<!-- <div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 control-label">收款方式:</label>
									<div class="col-lg-8">
										<select name="payType" class="select form-control input-xs">
											<option value="-1">选择收款方式</option>
											<option th:each="pt : ${payTypeList}" th:value="${pt.code}" th:text="${pt.name}"></option>
										</select>	
									</div>
								</div>
							</div>
						
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 control-label">收款方:</label>
									<div class="col-lg-8">
										<select name="payee" class="select form-control input-xs">
											<option value="-1">选择收款方</option>
											<option th:each="pe : ${payeeList}" th:value="${pe.code}" th:text="${pe.name}"></option>
										</select>
									</div>
								</div>
							</div> -->
							
							<div class="col-md-3">
								<div class="form-group">
									<input type="hidden" name="orderId" th:value="${orderId}"></input>
									<!-- <button type="button" id="submit" class="btn btn-primary">查询 <i class="icon-search position-right"></i></button> -->
									<button type="button" class="btn btn-primary btn-add" data-toggle="modal" data-target="#edit_dialog">新增<i class="icon-user-plus position-right"></i></button>
								</div>
							</div>
						</div>
        			</form>
				<table class="table datatable-basic table-striped table-hover">
					<thead>
						<tr class="bg-primary">
							<!-- <th>收款方式</th> -->
							<th>收款方</th>
							<th>第几次收款</th>
							<th>手续费</th>
							<th>金额</th>
							<th>金额性质</th>
							<th>收款日期</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody class="border-dashed">
						
					</tbody>
				</table>
			</div>
		</div>
		
		<div id="edit_dialog" class="modal fade in">
							<div class="modal-dialog">
								<div class="modal-content">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal">×</button>
										<h5 class="modal-title text-primary">收款明细</h5>
									</div>
				
									<form action="#" id="edit">
										<div class="modal-body">
										    
										    <div class="form-group hide">
												<label>付款方式<span class="text-danger">*</span></label>
												<select id="payType" name="payType" class="select form-control input-xs">
													<option value="-1" >请选择付款方式</option>
													<option th:each="pt : ${payTypeList}" th:value="${pt.code}" th:text="${pt.name}"></option>
												</select>	
											</div>
											
											<div class="form-group">
												<label>收款方<span class="text-danger">*</span></label>
												<select id="payee" name="payee" class="select form-control input-xs">
													<option value="-1" >请选择收款方</option>
													<option th:each="pe : ${payeeList}" th:value="${pe.code}" th:text="${pe.name}"></option>
												</select>	
											</div>
											
											<div class="form-group">
												<label>金额性质<span class="text-danger">*</span></label>
												<select id="type" name="type" class="select form-control input-xs">
													<option value="-1" >请选择金额性质</option>
													<option th:each="type : ${paymentTypeList}" th:value="${type.code}" th:text="${type.name}"></option>
												</select>	
											</div>
											
											<div class="form-group">
												<label>此次收款金额<span class="text-danger">*</span></label>
												<input name="amount" type="text" placeholder="此次收款金额" class="form-control" required="true" number="true" maxlength="50"/>
											</div>
											
											<div class="form-group">
												<label>手续费<span class="text-danger">*</span></label>
												<input name="feeAmount" type="text" placeholder="手续费" class="form-control" required="true" number="true" maxlength="50"/>
											</div>
											
											<div class="form-group">
												<label>收款时间<span class="text-danger">*</span></label>	
												<input type="text" id="payTime" readonly="readonly" name="payTime" class="form-control" required="true" placeholder="收款时间" />
											</div>
											
										    <input type="hidden" name="id"></input>
											<input type="hidden" name="orderId" th:value="${orderId}"></input>
										</div>
											
										<div class="modal-footer">
											<button type="button" class="btn btn-link" data-dismiss="modal">关闭</button>
											<button type="button" id="submitPayment" class="btn btn-primary" >保存</button>
										</div>
									</form>
								</div>
							</div>
						</div>

		<script type="text/templete" id="btnGroup">
			<div class="btn-group2" data-toggle="buttons">
				<button type="button" class="btn btn-link text-primary btn-edit" title="编辑" data-toggle="modal" data-target="#edit_dialog">编辑</button>
				<button type="button" class="btn btn-link text-primary btn-del" title="删除">删除</button>
				<button type="button" class="btn btn-link text-primary btn-balance" title="结算">结算</button>
			</div>
		</script>
		<!-- /table -->
		<script type="text/javascript" th:src="@{/oss/js/cOrderPayment.js}"></script>
	</div>
	<!-- /main content -->

</body>
</html>
